//
//  NewViewController.m
//  庐山通
//
//  Created by zcj on 15-10-23.
//  Copyright (c) 2015年 郑朝军. All rights reserved.
//

#import "NewViewController.h"
#import "Grouble.h"
#import "MyPagerPro.h"

@interface NewViewController ()<UIScrollViewDelegate>

@end

@implementation NewViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self setScroller];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setPagerInder];
    // Do any additional setup after loading the view.
}
- (void)setPagerInder
{
    //MyPagerPro * page = [[MyPagerPro alloc]init];
    
    
}

- (void)setScroller
{
    UIScrollView * scroller = [[UIScrollView alloc]init];
    scroller.frame = self.view.bounds;
    scroller.delegate = self;
    [self.view addSubview:scroller];
    CGFloat myViewX = 0;
    CGFloat myViewY = 0;
    CGFloat myViewW = [UIScreen mainScreen].bounds.size.width;
    CGFloat myViewH = [UIScreen mainScreen].bounds.size.height;
    
    UIImageView * myView = [[UIImageView alloc]initWithFrame:CGRectMake(myViewX, myViewY, myViewW, myViewH)];
    myView.image = [UIImage imageWithName:@"main_badge"];
    
     UIImageView * myView2 = [[UIImageView alloc]initWithFrame:CGRectMake(myViewX + myViewW, myViewY, myViewW * 2, myViewH)];
    myView2.image = [UIImage imageWithName:@"tabbar_compose_button_highlighted"];
    [scroller addSubview:myView];
    
    [scroller addSubview:myView2];
    scroller.contentSize = CGSizeMake(myViewW * 3, 0);
    scroller.showsHorizontalScrollIndicator = NO;
    scroller.pagingEnabled = YES;
    scroller.bounces = NO;
    
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    ZCJLog(@"scrollViewDidScroll");
}
@end
